/**
 * 
 * koa user路由设置
 */

const Router = require('@koa/router');
const router = new Router();
const useController = require('../controller/userController')
const {registValidator,loginValidator} = require('../middleware/invalidator/userValidator')
const jwtValidator = require('../middleware/invalidator/jwtValidatpr')
// 设置路由前缀
router.prefix('/user');

router.post('/regist',registValidator,useController.regist);
router.post('/login',loginValidator,useController.login);
router.get('/list',jwtValidator(),useController.list);
module.exports = router